Package com.cisco.pt.ipc.sim.impl
Class PortImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ProcessImpl
com.cisco.pt.ipc.sim.impl.PortImpl
- Direct Known Subclasses:
CloudPotsPortImpl,CloudSerialPortImpl,ConsolePortImpl,HostPortImpl,IoEComponentImpl,SwitchPortImpl,UsbPortImpl
Information provided by the PKI file:
\class Port
\brief Port holds and manipulates the ports on devices.
\example network().getDevice("Router0").getPort("FastEthernet0/0")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionPortImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionvoidintInformation provided by the PKI file:getBia()Information provided by the PKI file:intInformation provided by the PKI file:intInformation provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:intInformation provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:getLink()Information provided by the PKI file:Information provided by the PKI file:getName()Information provided by the PKI file:Information provided by the PKI file:booleangetPower()Information provided by the PKI file:Information provided by the PKI file:Information provided by the PKI file:getType()Information provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanisPortUp()Information provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanInformation provided by the PKI file:voidsetBandwidth(int bandwidth) Information provided by the PKI file:voidsetBandwidthAutoNegotiate(boolean autoNegotiate) Information provided by the PKI file:voidsetChannel(int channel) Information provided by the PKI file:voidsetClockRate(int clockrate) Information provided by the PKI file:voidsetDescription(String description) Information provided by the PKI file:voidsetDuplexAutoNegotiate(boolean autoNegotiate) Information provided by the PKI file:voidsetFullDuplex(boolean fullDuplex) Information provided by the PKI file:voidsetMacAddress(MACAddress macAddress) Information provided by the PKI file:voidsetPower(boolean bOn) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.ProcessImpl
getOwnerDeviceMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Constructor Details
-
PortImpl
public PortImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
getName
Information provided by the PKI file:
\brief Returns the name of the port. \return string, the name of the port. -
getChannel
public int getChannel()Information provided by the PKI file:
\brief Returns the channel of the port. \return int, the channel of the port.- Specified by:
getChannelin interfacePort- Returns:
- int Returns a int
-
setChannel
public void setChannel(int channel) Information provided by the PKI file:
\brief Sets the channel of the port. \channel, the channel of the port.- Specified by:
setChannelin interfacePort- Parameters:
channel- Takes in a parameter of channel
-
getTerminalTypeShortString
Information provided by the PKI file:
\brief Returns the name of the port shortened, without number. \return string, the name of the port.- Specified by:
getTerminalTypeShortStringin interfacePort- Returns:
- String Returns a String
-
getPortNameNumber
Information provided by the PKI file:
\brief Returns the port number. Can have something like 0/0/0, etc. \return string, the name of the port.- Specified by:
getPortNameNumberin interfacePort- Returns:
- String Returns a String
-
getType
Information provided by the PKI file:
\brief Returns the type of the port. \return PortType, the type of the port. Port types: eConsole = 0, eAux = 1, eCopperEthernet = 2, eCopperFastEthernet = 3, eCopperGigabitEthernet = 4, eFiberFastEthernet = 5, eFiberGigabitEthernet = 6, eSerial = 7, eSmartSerial = 8, eAccessPointWirelessG = 9, eAccessPointWirelessN = 10, eAccessPointWirelessA = 11, eHostWirelessG = 12, eHostWirelessN = 13, eSubInterface = 14, eLoopback = 15, ePortChannel = 16, eVlan = 17, eModem = 18, eRs232 = 19, eFRSubInterface = 20, eCopperCoaxial = 21, eCoaxial7 = 22, eVirtualLink = 23, eHostWirelessA = 24, eTunnel = 25, eVirtualTemplate = 26, ePtCoAxialSplitterModule = 27, eVirtualAccess = 28, eTerminal = 29, eAsync = 30, eNull = 31, eWlanGigabitEthernet = 32, eWlanConsole = 33, eBVI = 34, eAccessPoint3G = 35, eHost3G = 36, eUsbPort = 37, eGenericIoE = 38, eCustomIO = 39, eVirtualPortGroup = 40, ePoE = 41, eTty = 42, eUsbConsole = 43 -
setDescription
Information provided by the PKI file:
\brief Sets the description for the port. \param description, the description for the port.- Specified by:
setDescriptionin interfacePort- Parameters:
description- Takes in a parameter of description
-
getDescription
Information provided by the PKI file:
\brief Returns the description of the port. \return string, the description of the port.- Specified by:
getDescriptionin interfacePort- Returns:
- String Returns a String
-
setPower
public void setPower(boolean bOn) Information provided by the PKI file:
\brief Sets the power state for the port. \param bOn, true to turn the port on, false to turn it off. -
getPower
public boolean getPower()Information provided by the PKI file:
\brief Returns true if the port is on, false if the port is off. \return bool, true if the port is on, false if the port is off. -
isStraightPins
public boolean isStraightPins()Information provided by the PKI file:
\brief Returns true if the pins are straight, for ethernet \return bool, true if the pins are straight, otherwise false.- Specified by:
isStraightPinsin interfacePort- Returns:
- boolean Returns a boolean
-
isAutoCross
public boolean isAutoCross()Information provided by the PKI file:
\brief Returns true if the port is configured for auto crossover, for ethernet \return bool, true if the port is configured for auto crossover, otherwise false.- Specified by:
isAutoCrossin interfacePort- Returns:
- boolean Returns a boolean
-
setBandwidth
public void setBandwidth(int bandwidth) Information provided by the PKI file:
\brief Sets the bandwidth for the port. \param bandwidth, the bandwidth for the port.- Specified by:
setBandwidthin interfacePort- Parameters:
bandwidth- Takes in a parameter of bandwidth
-
getBandwidth
public int getBandwidth()Information provided by the PKI file:
\brief Returns the bandwidth of the port. \return int, the bandwidth of the port.- Specified by:
getBandwidthin interfacePort- Returns:
- int Returns a int
-
setBandwidthAutoNegotiate
public void setBandwidthAutoNegotiate(boolean autoNegotiate) Information provided by the PKI file:
\brief Enables or disables bandwidth auto negotiation. \param autoNegotiate, true to enable bandwidth auto negotiation, false to disable it.- Specified by:
setBandwidthAutoNegotiatein interfacePort- Parameters:
autoNegotiate- Takes in a parameter of autoNegotiate
-
isBandwidthAutoNegotiate
public boolean isBandwidthAutoNegotiate()Information provided by the PKI file:
\brief Returns true if bandwidth auto negotiation is enabled, otherwise false. \return bool, true if bandwidth auto negotiation is enabled, otherwise false.- Specified by:
isBandwidthAutoNegotiatein interfacePort- Returns:
- boolean Returns a boolean
-
setFullDuplex
public void setFullDuplex(boolean fullDuplex) Information provided by the PKI file:
\brief Enables or disables full duplex mode. \param fullDuplex, true to enable full duplex mode, false to disable it.- Specified by:
setFullDuplexin interfacePort- Parameters:
fullDuplex- Takes in a parameter of fullDuplex
-
isFullDuplex
public boolean isFullDuplex()Information provided by the PKI file:
\brief Returns true if full duplex mode is enabled, otherwise false. \return bool, true if full duplex mode is enabled, otherwise false.- Specified by:
isFullDuplexin interfacePort- Returns:
- boolean Returns a boolean
-
setDuplexAutoNegotiate
public void setDuplexAutoNegotiate(boolean autoNegotiate) Information provided by the PKI file:
\brief Enables or disables duplex auto negotiation. \param autoNegotiate, true to enable duplex auto negotiation, false to disable it.- Specified by:
setDuplexAutoNegotiatein interfacePort- Parameters:
autoNegotiate- Takes in a parameter of autoNegotiate
-
isDuplexAutoNegotiate
public boolean isDuplexAutoNegotiate()Information provided by the PKI file:
\brief Returns true if duplex auto negotiation is enabled, otherwise false. \return bool, true if duplex auto negotiation is enabled, otherwise false.- Specified by:
isDuplexAutoNegotiatein interfacePort- Returns:
- boolean Returns a boolean
-
setMacAddress
Information provided by the PKI file:
\brief Sets the MAC address on the port. \param macAddress, the MAC address to set on the port.- Specified by:
setMacAddressin interfacePort- Parameters:
macAddress- Takes in a parameter of macAddress
-
getMacAddress
Information provided by the PKI file:
\brief Returns the MAC address set on the port. \return mac, the MAC address set on the port.- Specified by:
getMacAddressin interfacePort- Returns:
- MACAddress Returns a MACAddress
-
getBia
Information provided by the PKI file:
\brief Returns the burned-in address of the port. \return mac, the burned-in address of the port. -
setClockRate
public void setClockRate(int clockrate) Information provided by the PKI file:
\brief Sets the clock rate on the port. \param clockrate, the clock rate to set on the port.- Specified by:
setClockRatein interfacePort- Parameters:
clockrate- Takes in a parameter of clockrate
-
getClockRate
public int getClockRate()Information provided by the PKI file:
\brief Returns the clock rate on the port. \return int, the clock rate on the port.- Specified by:
getClockRatein interfacePort- Returns:
- int Returns a int
-
getLink
Information provided by the PKI file:
\brief Returns the link connected to the port. \return Link, the Link object connected to the port. -
isProtocolUp
public boolean isProtocolUp()Information provided by the PKI file:
\brief Returns true if the line protocol is up on the port, otherwise false. \return bool, true if the line protocol is up on the port, otherwise false.- Specified by:
isProtocolUpin interfacePort- Returns:
- boolean Returns a boolean
-
isPortUp
public boolean isPortUp()Information provided by the PKI file:
\brief Returns true if the status is up on the port, otherwise false. \return bool, true if the status is up on the port, otherwise false. -
getEncapProcess
Information provided by the PKI file:
\brief Returns the encapsulation process. \return Process, the Process object.- Specified by:
getEncapProcessin interfacePort- Returns:
- Process Returns a Process
-
getKeepAliveProcess
Information provided by the PKI file:
\brief Returns the keepalive process. \return Process, the Process object.- Specified by:
getKeepAliveProcessin interfacePort- Returns:
- Process Returns a Process
-
getLightStatus
Information provided by the PKI file:
\brief Returns the link light status. \return LightStatus, the link light status. Link light statuses: eOffLight = 0, eAmberLight = 1, eGreenLight = 2, eBlink = 3- Specified by:
getLightStatusin interfacePort- Returns:
- LightStatus Returns a LightStatus
-
getHigherProcessCount
public int getHigherProcessCount()Information provided by the PKI file:
\brief Returns the higher process count. \return int, the higher process count.- Specified by:
getHigherProcessCountin interfacePort- Returns:
- int Returns a int
-
getHardwareQueue
Information provided by the PKI file:
\brief Returns the hardware queue. \return HardwareQueue, the hardware queue.- Specified by:
getHardwareQueuein interfacePort- Returns:
- HardwareQueue Returns a HardwareQueue
-
getQosQueue
Information provided by the PKI file:
\brief Returns the qos queue. \return QueueProcess, the qos queue.- Specified by:
getQosQueuein interfacePort- Returns:
- QueueProcess Returns a QueueProcess
-
isEthernetPort
public boolean isEthernetPort()Information provided by the PKI file:
\brief Returns true if it is a ethernet port, false if not. \return bool, true if it is a ethernet port, false if not.- Specified by:
isEthernetPortin interfacePort- Returns:
- boolean Returns a boolean
-
isWirelessPort
public boolean isWirelessPort()Information provided by the PKI file:
\brief Returns true if it is a wireless port, false if not. \return bool, true if it is a wireless port, false if not.- Specified by:
isWirelessPortin interfacePort- Returns:
- boolean Returns a boolean
-
isPowerOn
public boolean isPowerOn()Information provided by the PKI file:
\brief Returns true if the power is on, false if not. \return bool, true if the power is on, false if not. -
deleteLink
public void deleteLink()- Specified by:
deleteLinkin interfacePort
-